#include <iostream>
using namespace std;
template <typename T>
class Vector
{
    public:
        
        T * pContent;
        int size;
        int capacity;
    
        Vector()
        {
            capacity = 100;
            pContent = new T [capacity];
            size= 0;
        }
        ~Vector()
        {
            delete [] pContent;
        }
        Vector(const Vector& b)
        {
            size = b.size;
            capacity = b.capacity;
            pContent = new T[capacity];
            for(int i =0; i<size; i++)
                pContent[i] = b.pContent[i];
            
        }
        int get_size()
        {
            return size;
        }
        int  add(T  a)  //返回值是当前插入元素的下标值
        {
            
            if(capacity == size)
            {
                capacity= capacity+ 100;
                T * pTemp = new T[capacity];
                for(int i = 0; i<size; i++)
                     pTemp[i] = pContent[i];
                delete [] pContent;
                pContent = pTemp;
            }
            
            pContent[size] = a;
            size++;
            return size-1;
        }
        void remove(int i)
        {
            for(int j = i; j<size-1; j++)
                pContent[j] = pContent[j+1];
            size--;
        }
        T operator[] (int i)
        {
            return pContent[i];
        }

};